1. Field of the Invention
The present invention relates to a barrel shifter, and more specifically to a barrel shifter which can effect a carry-including data rotating operation at a high speed on the basis of a relatively simple hardware configuration without depending upon software.
2. Description of the Prior Art
In a register such as accumulator, data are circulated in a bit unit including a carry bit. To effect the carry-including data relating operation, a series of flip-flop circuits have been employed. However, in this flip-flop configuration, since only a single bit is shifted in response to a clock signal, in order to shift or rotate a data with a carry by N bits, it is necessary to supply N clock signals to the flip-flop circuit. Therefore, when a data of many bits is to be rotated together with a carry, it takes a long time (N cycles).
Further, the carry-including data rotating operation can be effected by use of a barrel shifter. In this case, after a data has been shifted by a predetermined shift count, a carry bit is inserted into any given position in accordance with a microprogram. Therefore, there still exists a problem in that it takes a long time to execute the microprogram.
The operation of the prior-art flip-flop circuit or the barrel shifter will be described in further detail hereinafter with reference to the attached drawings under DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS.